Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) Prevent workflow from failing on no-op #25533

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

hestonhoffman
Copy link
Contributor

@hestonhoffman hestonhoffman commented Oct 2, 2024

What does this PR do? What is the motivation?

The workflow that updates the synthetic-worker version was failing on the commit command when it didn't find any changes to the target file. Although the workflow wasn't broken (it just exited if no change was found), this behavior was confusing. This PR checks the existing version and writes a GitHub output variable that we can use to conditionally run the commit and push steps in the workflow. This should prevent the workflow from failing if there's nothing to commit.

test run: https://github.com/DataDog/documentation/actions/runs/11147491598/job/30981945184

Merge instructions

  • Please merge after reviewing

Additional notes

@hestonhoffman hestonhoffman added the Do Not Merge Just do not merge this PR :) label Oct 2, 2024
@hestonhoffman hestonhoffman requested a review from a team as a code owner October 2, 2024 16:01
@github-actions github-actions bot added Architecture Everything related to the Doc backend Github Related to Github configurations labels Oct 2, 2024
@hestonhoffman hestonhoffman requested a review from a team October 2, 2024 16:12
@hestonhoffman hestonhoffman removed the Do Not Merge Just do not merge this PR :) label Oct 2, 2024
@hestonhoffman hestonhoffman changed the title (maint) Prevent workflow from failing on no change (maint) Prevent workflow from failing on noop Oct 2, 2024
@hestonhoffman hestonhoffman changed the title (maint) Prevent workflow from failing on noop (maint) Prevent workflow from failing on no-op Oct 2, 2024
local/bin/py/version_getter.py Show resolved Hide resolved
@hestonhoffman hestonhoffman merged commit cad442f into master Oct 2, 2024
17 of 18 checks passed
@hestonhoffman hestonhoffman deleted the heston/update_pl_workflow branch October 2, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend Github Related to Github configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants